// pages/home/home.js
import { createStoreBindings } from "mobx-miniprogram-bindings";
import { store } from "../../store/store";
Page({
  data: {
  },
  btnHandle() {
    this.updateNum1(3)
  },
  async getInfo() {
    const data = await wx.p.request({
      url: 'https://www.escook.cn/api/get',
      data: { name: 'zs' }
    })
    console.log(data);
  },
  onLoad: function (options) {
    this.storeBindings = createStoreBindings(this, {
      store,
      fields: ["numA", "numB", "sum"],
      actions: ["updateNum1"],
    });
    // console.log(require('moment')().format('YYYY-MM-DD hh:mm:ss'));
    // console.log(require('../../utils/moment.js')().format('YYYY-MM-DD hh:mm:ss'));
  },
  onUnload: function () {
    this.storeBindings.destroyStoreBindings();
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },



  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})